package com.sky.demo.utils;

/**
 * @author 彬 QQ 1136096189
 * @Description: TODO 未分类工具类
 * @date 2015/8/17 15:30
 */
public class Tools {
    /**
     *防止连续点击
     */
    private static long lastClickTime;
    public synchronized static boolean isFastClick() {
        long time = System.currentTimeMillis();
        if ( time - lastClickTime < 500) {
            return true;
        }
        lastClickTime = time;
        return false;
    }
    public static String addSmall(String text){
        if(text==null||text.length()<=0){
            return "";
        }
        if(text.indexOf(".")<0)return "";
        String start=text.substring(0,text.lastIndexOf("."));
        String end=text.substring(text.lastIndexOf("."));
        String url=start+"_small"+end;
        return url;
    }
}
